import Mock from 'mockjs'

Mock.setup({
    timeout: '200'
})


let {  CodeGenerationLists, CodeGenerationTable } = Mock.mock({
    'CodeGenerationLists|10': [
        {
            'id|+1': 1,
            value1: ('@pick(["父级ID", "角色ID","角色名称","部门ID","部门名称","排序","创建人","修改人","字典ID"])'),
            value2: '@last',
            value3: '否',
            isSwitch3: false,
            value4: '@boolean',
            // value5: { label: ['显示 / 查询 / 编辑', '显示 / 编辑', '显示 / 查询', '显示', '查询 / 编辑', '查询', '编辑'] ,value},
            value5: [
                { value: 0, label: '显示 / 查询 / 编辑' },
                { value: 1, label: '显示 / 编辑' },
                { value: 2, label: '显示 / 查询' },
                { value: 3, label: '显示' },
                { value: 4, label: '查询 / 编辑' },
                { value: 5, label: '查询' },
                { value: 6, label: '编辑' },
            ],
            value6: '@integer(1, 10)',
            value7: '',
            value8: [
                { value: 0, label: 'input', },
                { value: 1, label: '模糊查询', },
                { value: 2, label: 'textarea', },
                { value: 3, label: 'switch', },
                { value: 4, label: 'select', },
                { value: 5, label: 'select多选', },
                { value: 6, label: 'date', },
                { value: 7, label: 'datetime', },
                { value: 8, label: 'year_month', },
                { value: 9, label: 'time', },
                { value: 10, label: '级联', },
                { value: 11, label: 'checkbox', },
                { value: 12, label: 'radio', },
                { value: 13, label: '区间查询', },
                { value: 14, label: 'mail', },
                { value: 15, label: 'number', },
                { value: 16, label: 'decimal', },
                { value: 17, label: 'phone', },
            ],
            value9: '@integer(1, 10)',
            value10: '',
            value11: [
                { value: 0, label: 'input', },
                { value: 1, label: 'textarea', },
                { value: 2, label: 'switch', },
                { value: 3, label: 'select', },
                { value: 4, label: 'select多选', },
                { value: 5, label: 'date', },
                { value: 6, label: 'datetime', },
                { value: 7, label: '年月日期格式', },
                { value: 8, label: 'time', },
                { value: 9, label: 'checkbox', },
                { value: 10, label: 'radio', },
                { value: 11, label: '级联', },
                { value: 12, label: '富文本编辑器', },
                { value: 13, label: 'mail', },
                { value: 14, label: 'number', },
                { value: 15, label: 'decimal', },
                { value: 16, label: 'phone', },
                { value: 17, label: 'img', },
                { value: 18, label: 'excel', },
                { value: 19, label: 'file', },
            ],

            value12: [
                { value: 0, label: 'enable', },
                { value: 1, label: 'restatus', },
                { value: 2, label: 'log', },
                { value: 3, label: 'roles', },
                { value: 4, label: 'audit', },
                { value: 5, label: 'city', },
                { value: 6, label: 'pro', },
                { value: 7, label: 'gender', },
                { value: 8, label: 'status', },
                { value: 9, label: 'isphone', },
                { value: 10, label: 'tree_roles', },
                { value: 11, label: '商品分类可用', },
                { value: 12, label: '分类级联', },
                { value: 13, label: '订单类型', },
                { value: 14, label: '订单状态', },
                { value: 15, label: '客户', },
                { value: 16, label: '商品规格', },
                { value: 17, label: '县', },
                { value: 18, label: '市', },
                { value: 19, label: '省', },
                { value: 20, label: '颜色', },
                { value: 21, label: '单位', },
                { value: 22, label: '尺寸', },
            ],
            value13: [
                { value: 0, label: 'img', },
                { value: 1, label: 'excel', },
                { value: 2, label: 'file', },
                { value: 3, label: 'date', },
            ],
            value14: '@integer(1320, 12320)',
            value15: '@integer(1, 10)',
            value16: 'int',
            value17: '@boolean',
            value18: '@boolean',
            value19: '@boolean',
            value20: '@boolean',
            value21: '@integer(10, 100)',
            value22: '',
            value23: '@now()',
            isShow: false,

        }
    ],
    'CodeGenerationTable': {
        num1: '@integer(1, 10)',
        num2: 0,
        num3: [
            { value: 0, label: 'Autofac' },
            { value: 1, label: 'Autofac.Extensions.DependencyInjection' },
            { value: 2, label: 'AutoMapper' },
            { value: 3, label: 'CSRedisCore' },
            { value: 4, label: 'Dapper' },
            { value: 5, label: 'EFCore.BulkExtensions' },
            { value: 6, label: 'FastMember.Signed' },
            { value: 7, label: 'Microsoft.AspNetCore.Authentication.JwtBearer' },
            { value: 8, label: 'Microsoft.AspNetCore.JsonPatch' },
            { value: 9, label: 'Microsoft.AspNetCore.Mvc.NewtonsoftJson' },
            { value: 10, label: 'Microsoft.Bcl.AsyncInterfaces' },
            { value: 11, label: 'Microsoft.Bcl.HashCode' },
            { value: 12, label: 'Microsoft.Data.SqlClient' },
            { value: 13, label: 'Microsoft.EntityFrameworkCore.Abstractions' },
            { value: 14, label: 'Microsoft.EntityFrameworkCore' },
            { value: 15, label: 'Microsoft.EntityFrameworkCore.Proxies' },
            { value: 16, label: 'Microsoft.EntityFrameworkCore.Relational' },
            { value: 17, label: 'Microsoft.EntityFrameworkCore.SqlServer' },
            { value: 18, label: 'Microsoft.Extensions.Caching.Redis' },
            { value: 19, label: 'Microsoft.Extensions.DependencyModel' },
            { value: 20, label: 'Microsoft.Identity.Client' },
            { value: 21, label: 'Microsoft.IdentityModel.JsonWebTokens' },
            { value: 22, label: 'Microsoft.IdentityModel.Logging' },
            { value: 23, label: 'Microsoft.IdentityModel.Protocols' },
            { value: 24, label: 'Microsoft.IdentityModel.Protocols.OpenIdConnect' },
            { value: 25, label: 'Microsoft.IdentityModel.Tokens' },
            { value: 26, label: 'Microsoft.OpenApi' },
            { value: 27, label: 'MySqlConnector' },
            { value: 28, label: 'Newtonsoft.Json.Bson' },
            { value: 29, label: 'Newtonsoft.Json' },
            { value: 30, label: 'Npgsql' },
            { value: 31, label: 'Npgsql.EntityFrameworkCore.PostgreSQL' },
            { value: 32, label: 'Pomelo.EntityFrameworkCore.MySql' },
            { value: 33, label: 'Pomelo.JsonObject' },
            { value: 34, label: 'SkiaSharp' },
            { value: 35, label: 'StackExchange.Redis.StrongName' },
            { value: 36, label: 'Swashbuckle.AspNetCore.Swagger' },
            { value: 37, label: 'Swashbuckle.AspNetCore.SwaggerGen' },
            { value: 38, label: 'Swashbuckle.AspNetCore.SwaggerUI' },
            { value: 39, label: 'System.Configuration.ConfigurationManager' },
            { value: 40, label: 'System.Data.SqlClient' },
            { value: 41, label: 'System.IdentityModel.Tokens.Jwt' },
            { value: 42, label: 'System.Runtime.Caching' },
            { value: 43, label: 'System.Security.Cryptography.ProtectedData' },
            { value: 44, label: 'System.Xml.XPath.XmlDocument' },
            { value: 45, label: 'VOL.Demo' },
            { value: 46, label: 'VOL.System' },
            { value: 47, label: 'VOL.WebApi' },
            { value: 48, label: 'ZKWeb.System.Drawing' },
        ],
        num4: ('@pick(["用户基础信息", "日志管理","字典数据","商品信息","商品分类","订单管理","订单明细","订单详情","客户管理","省市县","一对多","产品颜色"])'),
        num5: '@last',
        num6: '@name',
        num7: '@name',
        num8: '',
        num9: '',
        num10: '',
        num11: '',
        num12: '',
        num13: ''
    }
})


Mock.mock('https://www.vol.com/CodeGenerationLists/all', 'get', (option) => {
    return CodeGenerationLists
})

Mock.mock('https://www.vol.com/CodeGenerationTable/all', 'get', (option) => {
    return CodeGenerationTable
})


export default Mock